﻿/**
<code>
  <author name="Zealic" email="zealic(at)gmail.com" type="Creator"/>
</code>
**/
using System;

using NUnit.Framework;


namespace Zealib.Transform
{
    [TestFixture]
    public class TransformFunctional
    {
        [Test]
        public void TestTransformInt32ToString()
        {
            int value = 128;
            string strValue = value.TransformTo<string>();
            Assert.AreEqual("128", strValue);
        }

        [Test]
        public void TestTransformInt32BackString()
        {
            string value = "128";
            int intValue = value.TransformBack<int>();
            Assert.AreEqual(128, intValue);
        }

        [Test]
        public void TestTransformGuidToString()
        {
            const string GUID = "c2ba357b-91ac-4e54-a40e-e81d58730230";
            Guid guid = new Guid(GUID);
            string strGuid = guid.TransformTo<string>();
            Assert.AreEqual(GUID, strGuid);
        }

        [Test]
        public void TestTransformGuidBackString()
        {
            const string GUID = "c2ba357b-91ac-4e54-a40e-e81d58730230";
            Guid guid = GUID.TransformBack<Guid>();
            Assert.AreEqual(new Guid(GUID), guid);
        }

    }
}
